package com.gitee.wsl.coroutines.collections.map

import kotlinx.serialization.Serializable

/**
 * Represents a serializable implementation of the [Map.Entry] interface.
 *
 * This class is used to store a key-value pair entry that can be serialized using
 * Kotlin serialization. It is particularly useful in scenarios where key-value entries
 * need to be persisted or transferred across systems while maintaining type safety.
 *
 * @param K The type of the key.
 * @param V The type of the value.
 * @property key The key of the entry.
 * @property value The value of the entry.
 */
@Serializable
data class SerializableEntry<K, V>(
    override val key: K,
    override val value: V,
) : Map.Entry<K, V>